//
//  LingViewController.m
//  家范
//
//  Created by 吴军虎吴军虎 on 16/4/13.
//  Copyright © 2016年 lanjue. All rights reserved.
//

#import "LingViewController.h"
#import "YHYPriceViewTableViewCell.h"

@interface LingViewController ()<UITableViewDataSource,UITableViewDelegate>

@property (nonatomic,retain) UIView *myheaderView;
@property (nonatomic,retain) UITableView *myTableView;
@end

@implementation LingViewController

-(void) viewWillAppear:(BOOL)animated
{
    self.tabBarController.tabBar.hidden=YES;
}

-(void) viewWillDisappear:(BOOL)animated
{
    self.tabBarController.tabBar.hidden=NO;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor=LV;
    
    self.title=@"零钱明细";
    
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"back"] style:UIBarButtonItemStylePlain target:self action:@selector(Back:)];
    self.navigationItem.leftBarButtonItem.tintColor = [UIColor whiteColor];
//    [self getNewTime];
    [self creatView];
    [self createFoot];
}



- (void)creatView{
    _myTableView = [UITableView new];
    [self.view addSubview:_myTableView];
    [_myTableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.view);
        make.left.mas_equalTo(self.view);
        make.width.height.mas_equalTo(self.view);
        
    }];
    _myTableView.separatorStyle = UITableViewCellSelectionStyleNone;

    _myTableView.backgroundColor = LV;
    [_myTableView registerClass:[YHYPriceViewTableViewCell class] forCellReuseIdentifier:@"YHYPriceViewTableViewCell"];
    _myTableView.delegate = self;
    _myTableView.dataSource = self;
    
    
}
//-(void)getNewTime{
//
//
//       //获取当前时间
//    NSDate *  senddate=[NSDate date];
//    
//    NSDateFormatter  *dateformatter=[[NSDateFormatter alloc] init];
//    
//    [dateformatter setDateFormat:@"YYYY-MM-dd hh:mm:ss"];
//    
//    NSString *  locationString=[dateformatter stringFromDate:senddate];
//    
//    NSLog(@"locationString:%@",locationString);
//    data = nil;
//    data = locationString;
//
//}


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 3;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    YHYPriceViewTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"YHYPriceViewTableViewCell"];
    cell.selectionStyle=UITableViewCellSelectionStyleNone;
    return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 70 * AUTO_HEIGHT;
}


#pragma mark 内容
-(void) createFoot
{
    
//    //充值
//    UILabel *chonglabel=[[UILabel alloc]init];
//    [self setUpChildViewControll:chonglabel backgroundColor:nil alpha:0.8 text:@"充值" textColor:[UIColor blackColor] font:[UIFont systemFontOfSize:16]];
//    [chonglabel mas_makeConstraints:^(MASConstraintMaker *make){
//    
//        make.top.equalTo(self.view).offset(36/2 *AUTO_WIDTH);
//        make.left.equalTo(self.view).offset(57/2 *AUTO_WIDTH);
//        make.size.mas_equalTo(CGSizeMake(80 *AUTO_WIDTH, 25 *AUTO_WIDTH));
//    }];
//    
//    
//    //日期
//    dataLabel=[[UILabel alloc]init];
//    [self setUpChildViewControll:dataLabel backgroundColor:LV alpha:1.0 text:data textColor:ZI font:[UIFont systemFontOfSize:14]];
//    [dataLabel mas_makeConstraints:^(MASConstraintMaker *make){
//    
//        make.top.equalTo(chonglabel.mas_bottom).offset(12/2 *AUTO_WIDTH);
//        make.left.equalTo(self.view).offset(57/2 *AUTO_WIDTH);
//        make.size.mas_equalTo(CGSizeMake(160 *AUTO_WIDTH, 18 *AUTO_WIDTH));
//    }];
//    
//    //横线
//    UIImageView *henglabel=[[UIImageView alloc]init];
////    [self setUpChildViewControll:henglabel backgroundColor:[UIColor grayColor] alpha:0.4 text:nil textColor:nil font:nil];
//    
//    [henglabel mas_makeConstraints:^(MASConstraintMaker *make){
//    
//        make.top.equalTo(dataLabel.mas_bottom).offset(12/2 *AUTO_WIDTH);
//        make.left.equalTo(self.view).offset(57/2 *AUTO_WIDTH);
//        make.right.equalTo(self.view).offset(-57/2 *AUTO_WIDTH);
//        make.height.mas_equalTo(1 *AUTO_WIDTH);
//    }];
//    
//    //0.10
//    UILabel *label=[[UILabel alloc]init];
//    [self setUpChildViewControll:label backgroundColor:LV alpha:0.5 text:@"0.10" textColor:nil font:[UIFont fontWithName:SHUZI size:26]];
//    
//    [label mas_makeConstraints:^(MASConstraintMaker *make){
//    
//        make.top.mas_equalTo(self.view).offset(53/2 *AUTO_WIDTH);
//        make.right.mas_equalTo(self.view).offset(-63/2 *AUTO_WIDTH);
//        make.bottom.mas_equalTo(henglabel.mas_top).offset(-36/2 *AUTO_WIDTH);
//    }];
//    
//    
//    //加号
//    UILabel *jialabel=[[UILabel alloc]init];
//    [self setUpChildViewControll:jialabel backgroundColor:LV alpha:0.5 text:@"+" textColor:nil font:[UIFont fontWithName:SHUZI size:26]];
//    [jialabel mas_makeConstraints:^(MASConstraintMaker *make){
//    
//        make.top.equalTo(self.view).offset(58/2 *AUTO_WIDTH);
//        make.right.equalTo(label.mas_left).offset(0);
//        make.size.mas_equalTo(CGSizeMake(14 *AUTO_WIDTH, 20 *AUTO_WIDTH));
//    }];
}

//#pragma mark UILabel
//-(void) setUpChildViewControll:(UILabel *) label backgroundColor:(UIColor *) backgroundColor alpha:(CGFloat) alpha  text:(NSString *) text textColor:(UIColor *) textColor font:(UIFont *) font
//{
//    label.backgroundColor=backgroundColor;
//    label.alpha=alpha;
//    label.text=text;
//    label.textColor=textColor;
//    label.font=font;
//    [self.view addSubview:label];
//}
//
//返回按钮
-(void) Back:(UIButton *) btn
{
    [self.navigationController popViewControllerAnimated:YES];
}


@end
